package com.jmp.feign;

import one.stand.fallback.UserFallBack;
import one.stand.model.ResultModel;
import one.stand.request.BusinessCardRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: QIK
 * @CreateDate: 2019/4/16 14:43
 */
@Component
@FeignClient(value = "user-service", fallback = UserFallBack.class, decode404 = true)
public interface UserFegin {

    /**
     * 修改名片
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/updateCard")
    ResultModel<Boolean> updateCard(@RequestBody BusinessCardRequest request);

    /**
     * 查询用户自己的名片
     */
    @PostMapping("/businessCard/getUserCard")
    ResultModel getUserCard(@RequestBody BusinessCardRequest request);
}
